package com.mashuai.utils.ztest.toolkit.thread;

import com.mashuai.utils.toolkit.core.msThread.MsThreadUtils;
import com.mashuai.utils.toolkit.core.msThread.annotation.MsAsync;
import org.springframework.stereotype.Component;

import java.util.Random;

/**
 * @ClassName: MsThreadService
 * @Description:
 */
@Component
public class MsThreadService {

    @MsAsync
    public void testMsAsync(Integer i) {
//        int num = new Random().nextInt(501) + 500;
//        MsThreadUtils.threadSleep(num);
//        String msg = Thread.currentThread().getId() + "，i=" + i + "，睡眠:" + num + "/ms";
//        System.out.println(msg);
    }
}
